home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / tritonrexx376.lha / TritonRexx / Rexx / Button.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-16  |  1KB  |  62 lines

  1. /* Button.rexx */
  2.  
  3. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  4.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  5.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  6.       EXIT(10)
  7.    END
  8. END
  9.  
  10. windowtags =   WindowID(1),
  11.                WindowTitle('Button'),
  12.                   'HorizGroupA',
  13.                      'Space',
  14.                      'VertGroupA',
  15.                         'Space',
  16.                         Button("Knopf _1",1),
  17.                         Button("Knopf _2",2),
  18.                         'Space',
  19.                      'EndGroup',
  20.                      'Space',
  21.                   'EndGroup',
  22.                'EndProject'
  23.  
  24. app = TR_CREATEAPP('TRCA_Name Button')
  25.  
  26. IF app ~= '00000000'x THEN DO
  27.  
  28.    window = TR_OPENPROJECT(app,windowtags)
  29.  
  30.    IF window ~= '00000000'x THEN DO
  31.       ende = 0
  32.  
  33.       DO WHILE ende ~= 1
  34.          CALL TR_WAIT(app,'')
  35.  
  36.          DO WHILE TR_HANDLEMSG(app,'event')
  37.             IF event.trm_class = 'TRMS_ACTION' THEN DO
  38.                SELECT
  39.                   WHEN event.trm_id = 1 THEN
  40.                      SAY 'Knopf 1'
  41.  
  42.                   WHEN event.trm_id = 2 THEN
  43.                      SAY 'Knopf 2'
  44.  
  45.                   OTHERWISE
  46.                      NOP
  47.                END
  48.             END
  49.  
  50.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN
  51.                ende = 1
  52.          END
  53.       END
  54.  
  55.       CALL TR_CLOSEPROJECT(window)
  56.    END
  57.  
  58.    CALL TR_DELETEAPP(app)
  59. END
  60.  
  61. EXIT(0)
  62.